package com.zy.controller;

import com.zy.pojo.User;
import com.zy.service.UserService;
import com.zy.vo.ResultVo;
import com.zy.vo.UserVo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("sys/user")
public class UserController {
@Resource
    private UserService userService;
    @GetMapping("/list")
    public ResultVo getUserList(UserVo userVo){
        return ResultVo.sucess(userService.getUserList(userVo));
    }
    @GetMapping("/pagelist/{pageSize}/{pageNo}")
    public ResultVo getUserList(@PathVariable Integer pageSize, @PathVariable Integer pageNo, UserVo userVo){
        return ResultVo.sucess(userService.getPageUserList(pageNo,pageSize,userVo));
    }
}
